package com.yima.baseproj.config.redis.lock;

/**
 *
 * @Author 一码
 * @createDate 2023/4/1 09:00
 * @contact 1424529270@qq.com
 */
public interface Callback<T> {

    /**
     * 成功获取锁后执行方法
     *
     * @return
     * @throws InterruptedException
     */
    T onGetLock() throws InterruptedException;

    /**
     * 获取锁超时回调
     *
     * @return
     * @throws InterruptedException
     */
    T onTimeout() throws InterruptedException;
}
